package com.qingchi.web.service;

import com.socialuni.center.sdk.service.user.CenterGetCreateUserDetailService;
import com.socialuni.center.sdk.utils.UserUtils;
import com.socialuni.model.DO.user.SocialUserDO;
import com.socialuni.social.model.RO.user.SocialUserDetailRO;
import com.socialuni.social.utils.UserUtil;
import com.socialuni.uniapp.model.ProviderLoginQO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class GetCreateUserDetailService {

    @Resource
    CenterGetCreateUserDetailService centerGetCreateUserDetailService;

    public SocialUserDetailRO getCreateSaveUserDomain(ProviderLoginQO loginQO) {
        SocialUserDetailRO userDO = centerGetCreateUserDetailService.getCreateSaveUserDomain(loginQO);

        SocialUserDO systemUser = UserUtil.getSystemUser();


            //所有人注册默认关注系统用户
            followService.addFlow(user, sysUser);

        // 这里去做app独有的逻辑；
        return socialUserDetailRO;
    }
}
